import { Define, EntityObjectFactory } from 'tiny-entity2';
const EntityObjectType = EntityObjectFactory.GetEntityObjectType(process.env.dataBaseType || 'mysql');
@Define.Table({ TableName: 'kitchenrefundorderitem' })
export class KitchenRefundOrderItem extends EntityObjectType<KitchenRefundOrderItem>{
    @Define.PrimaryKey()
    id: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR,
        IsIndex: true,
        NotAllowNULL: true
    })
    kitchenRefundOrderId: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    kitchenSolutionId: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR,
        NotAllowNULL: true
    })
    orderItemId: string;

    @Define.Column({
        DataType: Define.DataType.Decimal,
        DefaultValue: 0
    })
    qty: number;

    @Define.Column({
        DataType: Define.DataType.VARCHAR,
        NotAllowNULL: true,
        IsIndex: true
    })
    storeId: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    status: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    productId: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    productName: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    operatorId: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    operatorName: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR
    })
    note: string;

    @Define.Column({
        DataType: Define.DataType.Decimal,
        DefaultValue: 0
    })
    recoveredQty: number;

    @Define.Column({
        DataType: Define.DataType.Decimal,
        DefaultValue: 0
    })
    scrapQty: number;

    @Define.Column({
        DataType: Define.DataType.BIGINT
    })
    version: number;
}

export const KitchenRefundOrderItemStatus = {
    Init: 'init',
}